package com.kaili.tms.mapper;

import com.baomidou.mybatisplus.plugins.Page;
import com.kaili.tms.pojo.entity.VehicleRouteAdd;
import com.kaili.tms.pojo.entity.VehicleRouteDelete;
import com.kaili.tms.pojo.entity.VehicleRouteQuery;
import com.kaili.tms.pojo.entity.VehicleRouteUpdate;
import com.kaili.tms.pojo.vo.VehicleRouteVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface VehicleRouteMapper {

    List<VehicleRouteVO> queryVehicleRoutes(Page<VehicleRouteVO> page, VehicleRouteQuery vehicleRouteQuery);

    int addVehicleRoute(VehicleRouteAdd vehicleRouteAdd);

    String getRouteCode();

    int addVehicleRouteCars(@Param("routeId") Integer routeId, @Param("carIds") Integer[] carIds);

    int updateVehicleRoute(VehicleRouteUpdate vehicleRouteUpdate);

    int deleteVehicleRoute(VehicleRouteDelete vehicleRouteDelete);

    VehicleRouteVO getVehicleRouteById(@Param("routeId") Integer routeId);

    int deleteVehicleRouteCars(@Param("routeId") Integer routeId);

}
